If you've ever wondered what it takes to get a job at Google, it seems problem-solving skills and 'thinking outside of the box' as essential to a successful . According to creator Tanya Zakowich, who is known as @pinkpencilmath on social media, Google used to ask its job candidates a in their interviews - and didn't hire anyone who failed it.
However, in 2013 Google is believed to have scaled back these questions, with former chief of Google human resources telling the New York Times they couldn't "predict anything" and primarily were there to "make the interviewer feel smart".
In a video, she said: "If you don't know the prisoner hat riddle, you're going to love this one. It's a super classic brainteaser that was commonly asked in job interviews at ." Explaining the riddle, she says: "There were four prisoners on a staircase all facing the same direction. A brick wall separates prisoner 4 from the rest."
She says prisoner 1 can see prisoners 2 and 3, while prisoner 2 can only see prisoner 3 and prisoners 3 and 4 cannot see anyone.
"All four prisoners are wearing hats. They are told there are only two black hats and white white hats. However, they do not know the colour of the hats they are personally wearing.
"The prisoners were told to shout out the colour of the hat they're wearing as soon as they know what colour it is."
READ MORE:
Knowing this, she says the question is: "Who is the first person to shout out correctly - and why?"
Setting out the rules, the prisoners cannot turn around to look at each other, move in any other formation, or take their own hats off.
Commenting on the brainteaser, one user said: "Prisoner two. If both prisoner two and three were wearing the same hat, one would have known that he was wearing the other hat. But since he didn’t, two knows that."
Another user added: "Two as he can use one's silence to infer that two and three have different colour hats. Since two can see three then two must be the opposite colour of three."
A third user said: "Four because he knew no one was looking at him so he took his hat off to look."
One more user added: "I used to give this riddle to my math students all the time. It’s two because one didn’t say anything so they know they’re different from three."
AnswerAccording to , the correct answer is prisoner two - referred to as B in their explanation.
A statement reads: "If prisoners B and C had the same colour hat on, prisoner A would have know immediately that his hat was the other colour (there are only two hats of each colour).
"Since prisoner A was silent, prisoners B and C must have different coloured hats. Prisoner B realised this and knew that his hat was not the same colour as prisoner C, therefore his hat must be black!"
You may also like
"Needs explicit answer from govt": Congress's Manish Tewari attacks Centre after Trump claims India offered zero tariff deal to US
Keir Starmer holds major press conference as he announces migration plan in Albania - watch LIVE
Zelenskyy slams Russian team as 'dummy' delegation in Turkey peace talks; Kremlin fires back, calls him 'clown'
Indian army won 1971 war on the battlefield, Indira lost it at the table: BJP
Pakistan is ready to discuss the Indus Water Treaty — but what does India want?